#include <cstdio>
#include <cctype>
#include <string>

using namespace std;


inline bool is_subsequence (const string &str_s, const string &str_t)
{
	const char *s, *t;

	s = str_s.c_str();
	t = str_t.c_str();

	for (; *s && *t; ++t)
	{
		if (*s == *t)
			++s;
	}

	return *s == '\0';
}


inline bool get_string (string &str)
{
	char c;
	str.clear();
	while (c = getchar(), !isspace(c) && c != EOF)
	{
		str += c;
	}
	return c != EOF;
}


int main ()
{
	string s, t;

	while (get_string(s))
	{
		get_string(t);
		puts(is_subsequence(s,t) ? "Yes" : "No");
	}

	return 0;
}